[FIX] 리뷰 점수 응답 정수 반올림 - #201
Conversation
📝 Code Coverage
|
Walkthrough세 개의 평가 응답 레코드에서 소수점 점수 필드를 정수로 변환하고, Changes평가 응답 점수 정수화
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ssd-api/src/main/java/or/hyu/ssd/api/document/response/EvaluatorReviewListResponse.java (1)
22-24: 💤 Low value
roundScore헬퍼 메서드가 3개 파일에 중복됩니다.
EvaluatorReviewDetailResponse,EvaluatorReviewListItemResponse,EvaluatorReviewListResponse모두 동일한roundScore메서드를 포함하고 있습니다. 공통 유틸리티 클래스로 추출하면 유지보수성이 향상됩니다.♻️ 리팩토링 제안
같은 패키지에 유틸리티 클래스를 생성:
package or.hyu.ssd.api.document.response; public final class ScoreUtils { private ScoreUtils() {} public static int roundScore(double score) { return (int) Math.round(score); } }각 Response 클래스에서
ScoreUtils.roundScore(...)호출로 변경할 수 있습니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ssd-api/src/main/java/or/hyu/ssd/api/document/response/EvaluatorReviewListResponse.java` around lines 22 - 24, The private helper method roundScore(double) is duplicated across EvaluatorReviewDetailResponse, EvaluatorReviewListItemResponse, and EvaluatorReviewListResponse; extract it into a shared utility (e.g., ScoreUtils with a public static roundScore(double)) and replace the three private implementations with calls to ScoreUtils.roundScore(...) in each response class to remove duplication and centralize rounding logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@ssd-api/src/main/java/or/hyu/ssd/api/document/response/EvaluatorReviewListResponse.java`:
- Around line 22-24: The private helper method roundScore(double) is duplicated
across EvaluatorReviewDetailResponse, EvaluatorReviewListItemResponse, and
EvaluatorReviewListResponse; extract it into a shared utility (e.g., ScoreUtils
with a public static roundScore(double)) and replace the three private
implementations with calls to ScoreUtils.roundScore(...) in each response class
to remove duplication and centralize rounding logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 076a542e-31ec-49e9-ac80-cf1de4de5dd5
📒 Files selected for processing (4)
ssd-api/src/main/java/or/hyu/ssd/api/document/response/EvaluatorReviewDetailResponse.javassd-api/src/main/java/or/hyu/ssd/api/document/response/EvaluatorReviewListItemResponse.javassd-api/src/main/java/or/hyu/ssd/api/document/response/EvaluatorReviewListResponse.javassd-api/src/test/java/or/hyu/ssd/api/document/response/EvaluatorReviewResponseRoundingTest.java
📣 Related Issue
📝 Summary
🙏 Details
Summary by CodeRabbit
Bug Fixes
Tests